//1.引入模块
import Vue from 'vue'
import Vuex from 'vuex'
import home from './modules/home'
import search from './modules/search'
import detail from './modules/detail'
import user from './modules/user'
import trade from './modules/trade'

//2.注册模块
Vue.use(Vuex)

//3.定义方法
const state = {
    //categoryList:[]
}

const actions = {}

const mutations ={}

const getters = {}

//4.导出
export default new Vuex.Store({
    state,
    actions,
    mutations,
    getters,
    modules:{home,search,detail,user,trade},// 和store对象关联起来  类似于组件注册
})